<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('统计分析')"/>
</head>
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">

    <div class="row">
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>在线设备</h5>
                    <h1 class="no-margins" th:text="${deviceVO.onDevCount}">0</h1>
                    <small>在线设备数</small>
                    <!--<button type="button" class="btn btn-outline btn-success onDev">查看详情</button>-->
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>离线设备</h5>
                    <h1 class="no-margins" th:text="${deviceVO.offDevCount}">0</h1>
                    <small>离线设备数</small>
                    <!--<button type="button" class="btn btn-outline btn-success allDev">查看详情</button>-->
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>已部署设备</h5>
                    <h1 class="no-margins" th:text="${deviceVO.devDeployCount}">0</h1>
                    <small>设备数量(机柜+线)</small>
                    <!--<button type="button" class="btn btn-outline btn-primary deployed">查看详情</button>-->
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>机柜闲置</h5>
                    <h1 class="no-margins" th:text="${deviceVO.devAsideDevCount}">0</h1>
                    <small>设备数量</small>
                    <!--<button type="button" class="btn btn-outline btn-warning asideDev">查看详情</button>-->
                </div>
            </div>
        </div>
    </div>


    <div class="row">
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>机柜设备</h5>
                    <h1 class="no-margins" th:text="${deviceVO.devNoLineCount}">0</h1>
                    <small>机柜设备数</small>
                    <!--<button type="button" class="btn btn-outline btn-success devNoLine">查看详情</button>-->
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>充电线</h5>
                    <h1 class="no-margins" th:text="${deviceVO.lineCount}">0</h1>
                    <small>充电线数</small>
                    <!--<button type="button" class="btn btn-outline btn-success lineCount">查看详情</button>-->
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>仓库设备</h5>
                    <h1 class="no-margins" th:text="${deviceVO.warehouseDevCount}">0</h1>
                    <small>仓库设备数</small>
                    <!--<button type="button" class="btn btn-outline btn-primary deployed">查看详情</button>-->
                </div>
            </div>
        </div>
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>充电线闲置</h5>
                    <h1 class="no-margins" th:text="${deviceVO.devAsideLineCount}">0</h1>
                    <small>设备数量</small>
                    <!--<button type="button" class="btn btn-outline btn-warning asideDev">查看详情</button>-->
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>在库机柜小宝</h5>
                    <h1 class="no-margins" th:text="${deviceVO.batterySnCount}">0</h1>
                    <small>机柜小宝数</small>
                </div>
            </div>
        </div>
    </div>

    <div class="row">
        <div class="col-sm-3">
            <div class="ibox">
                <div class="ibox-content">
                    <h5>机柜类型</h5>
                    <table class="table table-stripped small m-t-md">
                        <tbody>
                        <tr>
                            <td class="no-borders">
                                <i class="fa fa-circle text-navy"></i>
                            </td>
                            <td class="no-borders">
                                WS-6口设备：<span th:text="${deviceVO.devForWs6Count}"></span>
                            </td>
                        </tr>
                        <tr>
                            <td class="no-borders">
                                <i class="fa fa-circle text-navy"></i>
                            </td>
                            <td class="no-borders">
                                WS-12口设备：<span th:text="${deviceVO.devForWs12Count}"></span>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <i class="fa fa-circle text-navy"></i>
                            </td>
                            <td>
                                WS-9口设备: 0台
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <i class="fa fa-circle text-navy"></i>
                            </td>
                            <td>
                                WS-4口设备：0台
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
        <!--<div class="col-sm-3">-->
        <!--<div class="ibox">-->
        <!--<div class="ibox-content">-->
        <!--<h5>消息</h5>-->
        <!--<table class="table table-stripped small m-t-md">-->
        <!--<tbody>-->
        <!--<tr>-->
        <!--<td class="no-borders">-->
        <!--<i class="fa fa-circle text-danger"></i>-->
        <!--</td>-->
        <!--<td class="no-borders">-->
        <!--示例 01-->
        <!--</td>-->
        <!--</tr>-->
        <!--<tr>-->
        <!--<td>-->
        <!--<i class="fa fa-circle text-danger"></i>-->
        <!--</td>-->
        <!--<td>-->
        <!--示例 02-->
        <!--</td>-->
        <!--</tr>-->
        <!--<tr>-->
        <!--<td>-->
        <!--<i class="fa fa-circle text-danger"></i>-->
        <!--</td>-->
        <!--<td>-->
        <!--示例 03-->
        <!--</td>-->
        <!--</tr>-->
        <!--</tbody>-->
        <!--</table>-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
        <!--<div class="col-sm-3">-->
        <!--<div class="ibox">-->
        <!--<div class="ibox-content">-->
        <!--<h5>通知</h5>-->
        <!--<table class="table table-stripped small m-t-md">-->
        <!--<tbody>-->
        <!--<tr>-->
        <!--<td class="no-borders">-->
        <!--<i class="fa fa-circle text-danger"></i>-->
        <!--</td>-->
        <!--<td class="no-borders">-->
        <!--示例 01-->
        <!--</td>-->
        <!--</tr>-->
        <!--<tr>-->
        <!--<td>-->
        <!--<i class="fa fa-circle text-danger"></i>-->
        <!--</td>-->
        <!--<td>-->
        <!--示例 02-->
        <!--</td>-->
        <!--</tr>-->
        <!--<tr>-->
        <!--<td>-->
        <!--<i class="fa fa-circle text-danger"></i>-->
        <!--</td>-->
        <!--<td>-->
        <!--示例 03-->
        <!--</td>-->
        <!--</tr>-->
        <!--</tbody>-->
        <!--</table>-->
        <!--</div>-->
        <!--</div>-->
        <!--</div>-->
    </div>

</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: peity-js"/>
<th:block th:include="include :: sparkline-js"/>
<script type="text/javascript">
    $(document).ready(function () {

    });

    $(function () {

        var prefix = ctx + "system/device";

        $(".deployed").click(function () {
            var fullName = $("#fullName").val();
            var id = $("#pid").val();
            // 点击已部署设备
            var url = prefix + '/partnerDev/' + id + '/2';
            var width = null;
            var height = null;
            if ($.common.isMobile()) {
                width = 'auto';
                height = 'auto';
            }
            if ($.common.isEmpty(url)) {
                url = "/404.html";
            }
            if ($.common.isEmpty(width)) {
                width = 1200;
            }
            if ($.common.isEmpty(height)) {
                height = 660;
            }
            layer.open({
                type: 2,
                area: [width + 'px', height + 'px'],
                fix: false,
                maxmin: true,
                shade: 0.3,
                title: fullName + "已部署设备",
                content: url,
                btn: ['关闭'],
                // 弹层外区域关闭
                shadeClose: true,
                cancel: function (index) {
                    return true;
                }
            });
        });

        $(".allDev").click(function () {
            // 点击总设备数设备
            var fullName = $("#fullName").val();
            var id = $("#pid").val();
            var url = prefix + '/partnerDev/' + id + '/3';
            var width = null;
            var height = null;
            if ($.common.isMobile()) {
                width = 'auto';
                height = 'auto';
            }
            if ($.common.isEmpty(url)) {
                url = "/404.html";
            }
            if ($.common.isEmpty(width)) {
                width = 1200;
            }
            if ($.common.isEmpty(height)) {
                height = 660;
            }
            layer.open({
                type: 2,
                area: [width + 'px', height + 'px'],
                fix: false,
                maxmin: true,
                shade: 0.3,
                title: fullName + "设备",
                content: url,
                btn: ['关闭'],
                // 弹层外区域关闭
                shadeClose: true,
                cancel: function (index) {
                    return true;
                }
            });
        });

        $(".asideDev").click(function () {
            // 点击闲置设备
            var fullName = $("#fullName").val();
            var id = $("#pid").val();
            var url = prefix + '/partnerDev/' + id + '/1';
            var width = null;
            var height = null;
            if ($.common.isMobile()) {
                width = 'auto';
                height = 'auto';
            }
            if ($.common.isEmpty(url)) {
                url = "/404.html";
            }
            if ($.common.isEmpty(width)) {
                width = 1200;
            }
            if ($.common.isEmpty(height)) {
                height = 660;
            }
            layer.open({
                type: 2,
                area: [width + 'px', height + 'px'],
                fix: false,
                maxmin: true,
                shade: 0.3,
                title: fullName + "闲置设备",
                content: url,
                btn: ['关闭'],
                // 弹层外区域关闭
                shadeClose: true,
                cancel: function (index) {
                    return true;
                }
            });
        });


    });
</script>
</body>
</html>